<?xml version="1.0" encoding="iso-8859-1"?>

<!-- 
  -- Please see the readme.txt file included with this distribution for 
  -- attribution and copyright information.
  -->

<root version="2.0">
	<windowclass name="charsheet_featitem">
		<sizelimits>
			<minimum>
				<height>10</height>
			</minimum>
		</sizelimits>
		<sheetdata>
			<windowreferencefield name="shortcut">
				<anchored>
					<right>
						<anchor>right</anchor>
						<offset>-2</offset>
					</right>
					<top>
						<anchor>top</anchor>
					</top>
					<size>
						<width>20</width>
						<height>20</height>
					</size>
				</anchored>
				<icon>
					<normal>button_openwindow</normal>
					<empty>button_emptytarget</empty>
					<pressed>button_emptytarget</pressed>
				</icon>
				<allowdrop />
			</windowreferencefield>

			<textlistitemvalue name="value">
				<anchored>
					<left>
						<anchor>left</anchor>
						<offset>2</offset>
					</left>
					<right>
						<parent>shortcut</parent>
						<anchor>left</anchor>
						<offset>-3</offset>
					</right>
					<top>
						<anchor>top</anchor>
					</top>
				</anchored>
			</textlistitemvalue>
		</sheetdata>
	</windowclass>

	<windowclass name="charsheet_specialabilityitem">
		<sizelimits>
			<minimum>
				<height>10</height>
			</minimum>
		</sizelimits>
		<sheetdata>
			<windowreferencefield name="shortcut">
				<anchored>
					<right>
						<anchor>right</anchor>
						<offset>-2</offset>
					</right>
					<top>
						<anchor>top</anchor>
					</top>
					<size>
						<width>20</width>
						<height>20</height>
					</size>
				</anchored>
				<icon>
					<normal>button_openwindow</normal>
					<empty>button_emptytarget</empty>
					<pressed>button_emptytarget</pressed>
				</icon>
				<allowdrop />
			</windowreferencefield>

			<textlistitemvalue name="value">
				<anchored>
					<left>
						<anchor>left</anchor>
						<offset>2</offset>
					</left>
					<right>
						<parent>shortcut</parent>
						<anchor>left</anchor>
						<offset>-2</offset>
					</right>
					<top>
						<anchor>top</anchor>
					</top>
				</anchored>
			</textlistitemvalue>
		</sheetdata>
	</windowclass>

	<windowclass name="charsheet_profitem">
		<sizelimits>
			<minimum>
				<height>10</height>
			</minimum>
		</sizelimits>
		<sheetdata>
			<textlistitemvalue name="value">
				<anchored>
					<left>
						<anchor>left</anchor>
						<offset>2</offset>
					</left>
					<right>
						<anchor>right</anchor>
						<offset>-2</offset>
					</right>
					<top>
						<anchor>top</anchor>
					</top>
				</anchored>
			</textlistitemvalue>
		</sheetdata>
	</windowclass>

	<windowclass name="charsheet_abilities">
		<placement>
			<size>
				<width>252</width>
				<height>611</height>
			</size>
		</placement>
		<nodelete />
		<sheetdata>
			<!-- NAME / RACE -->
			<genericcontrol name="overviewframe">
				<bounds>15,20,480,45</bounds>
				<frame>
					<name>sheetgroup</name>
				</frame>
			</genericcontrol>

			<labeledstring name="name">
				<anchored>
					<to>overviewframe</to>
					<position>insidetopleft</position>
					<offset>15,10</offset>
					<size>
						<width>250</width>
						<height>20</height>
					</size>
				</anchored>
				<label>name</label>
				<tabtarget>
					<next>race</next>
					<prev>notes</prev>
				</tabtarget>
			</labeledstring>

			<labeledstring name="race">
				<anchored>
					<to>overviewframe</to>
					<position>insidetopleft</position>
					<offset>275,10</offset>
					<size>
						<width>195</width>
						<height>20</height>
					</size>
				</anchored>
				<label>race</label>
				<tabtarget>
					<next>gender</next>
					<prev>name</prev>
				</tabtarget>
			</labeledstring>

			<!-- FEATS -->
			<genericcontrol name="featframe">
				<bounds>15,65,240,375</bounds>
				<frame>
					<name>sheetgroup</name>
				</frame>
			</genericcontrol>
			
			<stringcontrol>
				<anchored>
					<to>featframe</to>
					<position>insidetop</position>
					<offset>0,11</offset>
				</anchored>
				<center />
				<font>sheetlabel</font>
				<static>Feats</static>
			</stringcontrol>
			
			<windowlist name="featlist">
				<anchored>
					<to>featframe</to>
					<position>over</position>
					<offset>-12,-9</offset>
					<top>
						<parent>featframe</parent>
						<offset>30</offset>
					</top>
				</anchored>
				<datasource>.featlist</datasource>
				<class>charsheet_featitem</class>
				<allowcreate />
				<allowdelete />
				<script file="scripts/charsheet_abilities.lua" />
			</windowlist>

			<!-- SPECIAL ABILITIES -->
			<genericcontrol name="specialabilityframe">
				<bounds>255,65,240,375</bounds>
				<frame>
					<name>sheetgroup</name>
				</frame>
			</genericcontrol>

			<stringcontrol>
				<anchored>
					<to>specialabilityframe</to>
					<position>insidetop</position>
					<offset>0,11</offset>
				</anchored>
				<font>sheetlabel</font>
				<center />
				<static>Special Abilities</static>
			</stringcontrol>
¨
			<windowlist name="specialabilitylist">
				<anchored>
					<to>specialabilityframe</to>
					<position>over</position>
					<offset>-12,-9</offset>
					<top>
						<parent>specialabilityframe</parent>
						<offset>30</offset>
					</top>
				</anchored>
				<datasource>.specialabilitylist</datasource>
				<class>charsheet_specialabilityitem</class>
				<allowcreate />
				<allowdelete />
				<script file="scripts/charsheet_abilities.lua" />
			</windowlist>

			<!-- ARMOR PROFICIENCY -->
			<genericcontrol name="armorprofframe">
				<bounds>15,440,240,150</bounds>
				<frame>
					<name>sheetgroup</name>
				</frame>
			</genericcontrol>

			<stringcontrol>
				<anchored>
					<to>armorprofframe</to>
					<position>insidetop</position>
					<offset>0,11</offset>
				</anchored>
				<font>sheetlabel</font>
				<center />
				<static>Armor Proficiency</static>
			</stringcontrol>
¨
			<windowlist name="armorproflist">
				<anchored>
					<to>armorprofframe</to>
					<position>over</position>
					<offset>-12,-9</offset>
					<top>
						<parent>armorprofframe</parent>
						<offset>25</offset>
					</top>
				</anchored>
				<datasource>.proficiencyarmor</datasource>
				<class>charsheet_profitem</class>
				<allowcreate />
				<allowdelete />
				<script>
					function onSortCompare(w1, w2)
						if w1.value.getValue() == "" then
							return true;
						elseif w2.value.getValue() == "" then
							return false;
						end
					
						return w1.value.getValue() &gt; w2.value.getValue();
					end
					
					function onClickDown(button, x, y)
						return true;
					end

					function onClickRelease(button, x, y)
						if not getNextWindow(nil) then
							local wnd = NodeManager.createWindow(self);
							if wnd then
								wnd.value.setFocus();
							end
						end
						return true;
					end
				</script>
			</windowlist>

			<!-- WEAPON PROFICIENCY -->
			<genericcontrol name="weaponprofframe">
				<bounds>255,440,240,150</bounds>
				<frame>
					<name>sheetgroup</name>
				</frame>
			</genericcontrol>

			<stringcontrol>
				<anchored>
					<to>weaponprofframe</to>
					<position>insidetop</position>
					<offset>0,11</offset>
				</anchored>
				<font>sheetlabel</font>
				<center />
				<static>Weapon Proficiency</static>
			</stringcontrol>
¨
			<windowlist name="weaponproflist">
				<anchored>
					<to>weaponprofframe</to>
					<position>over</position>
					<offset>-12,-9</offset>
					<top>
						<parent>weaponprofframe</parent>
						<offset>25</offset>
					</top>
				</anchored>
				<datasource>.proficiencyweapon</datasource>
				<class>charsheet_profitem</class>
				<allowcreate />
				<allowdelete />
				<script>
					function onSortCompare(w1, w2)
						if w1.value.getValue() == "" then
							return true;
						elseif w2.value.getValue() == "" then
							return false;
						end
					
						return w1.value.getValue() &gt; w2.value.getValue();
					end
					
					function onClickDown(button, x, y)
						return true;
					end

					function onClickRelease(button, x, y)
						if not getNextWindow(nil) then
							local wnd = NodeManager.createWindow(self);
							if wnd then
								wnd.value.setFocus();
							end
						end
						return true;
					end
				</script>
			</windowlist>

		</sheetdata>
	</windowclass>
</root>
